package com.javatom.notes.feign.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 实现用feign 调用外部网站
 */
@FeignClient(name = "feignExternal",url = "https://www.baidu.com")
public interface FeignExternalService {
    @RequestMapping(value = "/s?wd={queryStr}", method = RequestMethod.GET,)
    byte[] search(@PathVariable("queryStr")  String queryStr);
}
